
pkgname=libedit
pkgver=20180525_3.1
_pkgver=20180525-3.1
pkgrel=1
pkgdesc='Command line editor library providing generic line editing, history, and tokenization functions'
arch=('x86_64')
url='http://thrysoee.dk/editline/'
license=('BSD')
depends=('ncurses')
options=('!libtool')
source=("http://thrysoee.dk/editline/libedit-${_pkgver}.tar.gz")
md5sums=('97679319742f45d6cdcd6075511b14ac')

build() {
	cd ${pkgname}-${_pkgver}
	
	./configure --prefix=/usr --enable-widec --enable-static=no
	make
}

package() {
	cd ${pkgname}-${_pkgver}
	make prefix=${pkgdir}/usr install

	cp ${pkgdir}/usr/share/man/man3/editline.3 ${pkgdir}/usr/share/man/man3/el.3
	install -Dm644 COPYING ${pkgdir}/usr/share/licenses/libedit/LICENSE
	# readline conflict
	rm ${pkgdir}/usr/share/man/man3/history.3
}
